<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertDefinition name="layout">
	<tiles:putAttribute name="head">
		<script type="text/javascript">
	    $(function() {
		$("#datepicker").datepicker({
		    showWeek : true,
		    firstDay : 1,
		    dateFormat : 'yy-mm-dd',
		    showOtherMonths : true,
		    selectOtherMonths : true
		});

		$(".lessonTime").timepicker({
		    defaultTime : '09:00',
		    showMeridian : false
		});

		$("form").Validform({
		    ajaxPost : true,
		    tiptype : ValidUtils.siblingTip,
		    callback : function(data) {
			helper.showMsg(data, {
			    okHandler : function() {
				location = "../log/viewLogByTime?id=" + data.id;
			    }
			});
		    }
		});
	    });
	</script>
	</tiles:putAttribute>
	<tiles:putAttribute name="mainBody">
		<ul class="breadcrumb">
			<li><s:url action="listStudent" namespace="/student" id="listStudent">
				</s:url> <a href="${listStudent}">学员列表</a> <span class="divider">/</span></li>
			<li><s:url action="viewLogByTime" namespace="/log" id="viewLogByTime">
					<s:param name="id" value="#signCourse.student.id"></s:param>
				</s:url> <a href="${viewLogByTime}">学员日志</a> <span class="divider">/</span></li>
			<li class="active">试听课程</li>
		</ul>
		<form class="form-horizontal" action="doOrderHistoryLesson">
			<input name="signCourseId" type="hidden" value="${param.signCourseId}" />
			<fieldset>
				<legend>
					为 <strong>${signCourse.student.name}</strong> 补订历史课程
				</legend>
				<div class="control-group">
					<div class="control-label">日期</div>
					<div class="controls">
						<input type="text" name="date" id="datepicker" />
					</div>
				</div>
				<div class="control-group">
					<div class="control-label">时间</div>
					<div class="controls">
						<div class="input-append bootstrap-timepicker">
							<input name="beginTime" class="lessonTime input-small" type="text"> <span class="add-on"> <i class="icon-time"></i>
							</span>
						</div>
						<div class="input-append bootstrap-timepicker">
							<input name="endTime" class="lessonTime input-small" type="text"> <span class="add-on"> <i class="icon-time"></i>
							</span>
						</div>
					</div>
				</div>
				<div class="control-group">
					<div class="control-label">备注</div>
					<div class="controls">
						<input type="text" name="title" />
					</div>
				</div>
			</fieldset>
			<div class="control-group">
				<div class="controls">
					<button class="btn btn-primay">提交</button>
				</div>
			</div>
		</form>
	</tiles:putAttribute>
</tiles:insertDefinition>